package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.LineTrend;
import com.example.demo.entity.NocvData;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Coding路人王
 * @date 2022/5/24 10:36
 */
public interface IndexMapper extends BaseMapper<NocvData> {

    /**
     * 接口： 只有方法定义，写业务逻辑
     * 1.实现类，谢你自己的业务逻辑
     * 2.XML  mybatisplus 一种实现
     * 3.@Select
     */
    @Select("select * from line_trend order by create_time desc limit 7")
    List<LineTrend> findSevenData();

    @Select("select * from nocv_data order by id desc limit 34")
    List<NocvData> listOrderByIdLimit34();
}
